#
# Makefile for non-Microsoft compilers
#

## Linux  (uncomment the 2 lines below for compilation on Linux)
CXXFLAGS += -std=c++98 -Wall -O4
LDFLAGS += -lrt -O4

## CygWin (uncomment the 2 lines below for compilation on CygWin)
#CXXFLAGS += -Wall
#LDFLAGS += 

## Main application file
MAIN = Test

all: $(MAIN)

# COMPILE
$(MAIN): $(MAIN).cpp Snap.o API.o LearnedModel.o Lottery.o Greedy4.o Greedy3.o Greedy2.o Greedy.o BaselineRandomWalk.o
	g++ -o $(MAIN) $(MAIN).cpp Snap.o API.o LearnedModel.o Lottery.o Greedy4.o Greedy3.o Greedy2.o Greedy.o BaselineRandomWalk.o -I../../glib -I../../snap $(LDFLAGS) 

Greedy.o:
	g++ -c -O4 Greedy.cpp

Greedy2.o:
	g++ -c -O4 Greedy2.cpp

Greedy3.o:
	g++ -c -O4 Greedy3.cpp

Greedy4.o:
	g++ -c -O4 Greedy4.cpp

Greedy5.o:
	g++ -c -O4 Greedy5.cpp

Adaptive.o:
	g++ -c -O4 Adaptive.cpp

LearnedModel.o:
	g++ -c -O4 LearnedModel.cpp

Lottery.o:
	g++ -c -O4 Lottery.cpp

BaselineRandomWalk.o:
	g++ -c -O4 BaselineRandomWalk.cpp

API.o:
	g++ -c -O4 API.cpp

Snap.o: 
	g++ -c $(CXXFLAGS) ../../snap/Snap.cpp -I../../glib -I../../snap

clean:
	rm -f *.o  $(MAIN)  $(MAIN).exe
	rm -rf Debug Release

